<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.CreateComprasDetalleTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.CreateComprasDetalleLabel_comprasDetallePK_nroLinea}" for="comprasDetallePK_nroLinea" />
                    <h:inputText id="comprasDetallePK_nroLinea" value="#{comprasDetalleController.selected.comprasDetallePK.nroLinea}" title="#{bundle.CreateComprasDetalleTitle_comprasDetallePK_nroLinea}" required="true" requiredMessage="#{bundle.CreateComprasDetalleRequiredMessage_comprasDetallePK_nroLinea}"/>
                    <h:outputLabel value="#{bundle.CreateComprasDetalleLabel_cantidad}" for="cantidad" />
                    <h:inputText id="cantidad" value="#{comprasDetalleController.selected.cantidad}" title="#{bundle.CreateComprasDetalleTitle_cantidad}" />
                    <h:outputLabel value="#{bundle.CreateComprasDetalleLabel_costo}" for="costo" />
                    <h:inputText id="costo" value="#{comprasDetalleController.selected.costo}" title="#{bundle.CreateComprasDetalleTitle_costo}" />
                    <h:outputLabel value="#{bundle.CreateComprasDetalleLabel_comprasCabecera}" for="comprasCabecera" />
                    <h:selectOneMenu id="comprasCabecera" value="#{comprasDetalleController.selected.comprasCabecera}" title="#{bundle.CreateComprasDetalleTitle_comprasCabecera}" required="true" requiredMessage="#{bundle.CreateComprasDetalleRequiredMessage_comprasCabecera}">
                        <f:selectItems value="#{comprasCabeceraController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputLabel value="#{bundle.CreateComprasDetalleLabel_codArticulo}" for="codArticulo" />
                    <h:selectOneMenu id="codArticulo" value="#{comprasDetalleController.selected.codArticulo}" title="#{bundle.CreateComprasDetalleTitle_codArticulo}" >
                        <f:selectItems value="#{articulosController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                </h:panelGrid>
                <br />
                <h:commandLink action="#{comprasDetalleController.create}" value="#{bundle.CreateComprasDetalleSaveLink}" />
                <br />
                <br />
                <h:commandLink action="#{comprasDetalleController.prepareList}" value="#{bundle.CreateComprasDetalleShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:link outcome="/index" value="#{bundle.CreateComprasDetalleIndexLink}"/>
            </h:form>
        </ui:define>
    </ui:composition>

</html>
